<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/tagInclude.jsp"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<base href="${basePath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="${basePath}styleAdmin/css/portalinabox.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="${basePath}styleAdmin/js/prototype-1.6.0.3.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>栏目管理--修改</title>
<script type="text/javascript">
	function checkForm(){
		var errors = "" ;
		if($F('languageId') == "" ){
			errors += "栏目名称语种不能为空<br/>" ;
		}
		if($F('channelParentId') == "" ){
			errors += "栏目父节点不能为空<br/>" ;
		}
		if($F('showType') == "" ){
			errors += "栏目展现形式不能为空<br/>" ;
		}
		if($F('channelName') == "" ){
			errors += "栏目名称不能为空<br/>" ;
		}
		if(errors.length > 0){
			$('errors').innerHTML = "<font color='red' size='12'>" + errors  + "</font>" ;
			return ;
		}
		document.myform.submit();
	}
</script>
</head>
<body bottomMargin="0" leftMargin="0" rightMargin="0" topmargin="0">
<form name="myform" method="post" action="${basePath}admin/channel/${act}" enctype="multipart/form-data">
<%@ include file="../common/navigate.jsp" %>
<input type="hidden" name="channelId" id="channelId" value="${channelInfo.channelId}" />
<table width="90%" border="0" align="center" cellPadding="0" cellSpacing="0" style="margin-top:5px;">
 <tr><td align="center" colspan="2"><div id="errors"></div></td></tr>
 <tr>
	<td vAlign="top" align="center" height="157">
		<table width="10" border="1" class="mainFunctionTable"  cellpadding="0" cellspacing="1">
        	<tr height="25" class="pLabel">
            	<td colspan="2" class="td_nwarpstyle" align="left">&nbsp;&nbsp;修改栏目--${channelInfo.channelName}(不建议修改栏目的关系)</td>
            </tr>
			<tr>
         		<td align="center" width="10%">语言种类</td>
         		<td align="left">
         			<select name="languageId" id="languageId" disabled="disabled">
         				<option value="">请选择</option>
						<c:forEach items="${languageInfoList }" var="languageInfo">
         					<option value="${languageInfo.id}" <c:if test="${languageInfo.id == channelInfo.languageId}">selected</c:if>>${languageInfo.name }</option>
         				</c:forEach>
         			</select>
         			&nbsp;&nbsp;<font color='red'>*</font>
         		</td>
    		 </tr>
			<tr>
         		<td align="center" width="10%">父节点</td>
         		<td align="left">
         			<select name="channelParentId" id="channelParentId" disabled="disabled">
         				<option value="">请选择</option>
						<option value='0' <c:if test="${channelInfo.channelParentId == 0}">selected</c:if>>根结点</option>
						<c:forEach items="${channelInfoList }" var="channelInfoP">
							<option value='${channelInfoP.channelId}' <c:if test="${channelInfo.channelParentId == channelInfoP.channelId}">selected</c:if>>${channelInfoP.channelName}</option>
						</c:forEach>
         			</select>
         			&nbsp;&nbsp;<font color='red'>*</font>
         		</td>
    		 </tr>
			<tr>
         		<td align="center" width="10%">展现形式</td>
         		<td align="left">
					<select name="showType" id="showType" disabled="disabled">
         				<option value="">请选择</option>
						<option value='1' <c:if test="${channelInfo.showType == 1}">selected</c:if>>列表展现</option>
						<option value='2' <c:if test="${channelInfo.showType == 2}">selected</c:if>>内容展现</option>
         			</select>
         			&nbsp;&nbsp;<font color='red'>*</font>
				</td>
    		 </tr>
            <tr>
         		<td align="center" width="10%">栏目名称</td>
         		<td align="left"><input type="text" name="channelName" id="channelName" value="${channelInfo.channelName}" size="80"/>&nbsp;&nbsp;<font color='red'>*</font></td>
    		 </tr>
			<tr>
         		<td align="center" width="10%">栏目图片</td>
         		<td align="left"><input type="file" name="channelImage" id="channelImage" value="" size="80"/>
         			<c:choose>
			   			<c:when test="${not empty channelInfo.channelImage}"><a href="${channelInfo.channelImage}" target="_blank">&nbsp;&nbsp;查看图片</a></c:when>
			   			<c:otherwise></c:otherwise>
			   		</c:choose>
				</td>
    		 </tr>
             <tr>
              <td align="center" width="10%">栏目概况描述<br/>[用来描述此栏目或者分类]</td>
              <td align="left">
              	<FCK:editor height="380" instanceName="channelDesc" value="${channelInfo.channelDesc}"></FCK:editor>
              </td>
            </tr>
            <tr align="left">
              <td align="center" colspan="2">
	              <a href="javascript:checkForm();"><img src="${basePath}styleAdmin/images/button/save.gif" border=0></a>
	              &nbsp;&nbsp;
			      <a href="${basePath}admin/channel/list?languageId=${channelInfo.languageId}&channelParentId=${channelInfo.channelParentId}"><img src="${basePath}styleAdmin/images/button/exit.gif" border=0></a> 
              </td>
            </tr>
          </table>
      </td>
  </tr>
</table>
</form>
</body>
</html>